package ink.metoo.auto.fishpi.chatroom.command

import ink.metoo.auto.fishpi.Settings
import ink.metoo.auto.fishpi.chatroom.Message

class SetSettingCommand: Command {

    override val commandText: String
        get() = "/设置"

    override fun isMatch(message: Message): Boolean {
        return super.isMatch(message) && message.isMe
    }

    override fun execute(message: Message) {
        val params = message.commandParams
        when(params[1]) {
            "猜拳最大" -> {
                Settings.chatRoom.watchRockPaperScissorsMoney.max = params[2].toInt()
            }
            "猜拳最小" -> {
                Settings.chatRoom.watchRockPaperScissorsMoney.min = params[2].toInt()
            }
        }
    }


}